home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9302 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: newsfeeds.ans.net!btco!newsadm
  2. From: Shalom Reich <sqr1874@acf4.nyu.edu>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Fahrenheight to Celsius?
  5. Date: Thu, 29 Feb 1996 15:27:22 -0500
  6. Organization: Bankers Trust Company
  7. Message-ID: <31360C2A.6183@acf4.nyu.edu>
  8. References: <4fvthq$2bl@newserv.agcs.com> <4fra3q$ddt@newsbf02.news.aol.com> <1996Feb26.060213.23285@lafn.org> <4h1v08$eks@druid.borland.com> <xmsb.825531341@shadow>
  9. NNTP-Posting-Host: algsvw0058.btco.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0GoldB1 (WinNT; I)
  14.  
  15. Maurice S. Barnum wrote:
  16. > pete@borland.com (Pete Becker) writes:
  17. > >In article <1996Feb26.060213.23285@lafn.org>, an234@lafn.org says...
  18. > >>
  19. > >>F = C*(9/5) +32
  20. > >>C = (F-32)*(5/9)
  21. > >He was better off without this answer, which is wrong.
  22. >     my favorite conversion equations, which i learned from
  23. >     reading an article by isaac asimov,  [snip]
  24. > F = (C + 40) / 1.8 - 40
  25. > C = (F + 40) * 1.8 - 40
  26.  
  27. You have the Fs and Cs mixed up in your equations.  Otherwise, 
  28. they are exactly equivalent to the original formulas.
  29.  
  30. Given F(32) = C(0) = freezing point of water,
  31. and  F(212) = C(100) - boiling point of water
  32.  
  33. then the range in F is 180 degrees and the range in C is 100 degrees.
  34.  
  35. Since 180/100 = 1.8 = 9/5 and 100/180 = 5/9 you get the ratios
  36. between the two scales.  All that is left is the scaling (i.e. F
  37. "begins" at 32 and C "begins" at 0 - at least as far as water boiling 
  38. and freezing are concerned).
  39.  
  40. If we take the two equations for C, we can show them equivalent.
  41.  
  42.      [1] C = (F-32)*(5/9)
  43.  
  44.          C = (F-32)/1.8
  45.          C = (F/1.8) - (32/1.8)
  46.  
  47. Similarly,
  48.  
  49.      [2] C = (F + 40) / 1.8 - 40  (F and C switched as in my comment above)
  50.  
  51.          C = (F/1.8) + (40/1.8) - 40
  52.          C = (F/1.8) + (40/1.8) - (72/1.8)  (convert 40 to (40*1.8)/1.8)
  53.          C = (F/1.8) - (32/1.8)
  54.  
  55. Which is exactly what the first equation was equal to.
  56.  
  57. Checking the F equations is left as an excercise (sp?) for the reader.
  58.  
  59. Shalom Reich
  60.